/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __BLPF2_H
#define __BLPF2_H

#include "math.h"

typedef struct _blpf2_t_
{
    float b0,b1,b2;
    float a1,a2;

    float xn[3];    // 前几次的输入
    float yn[3];    // 前几次的输出

    char apply_num;
} blpf2_t;

#define     LPF_PI           (3.1415926535897f)
#define     warning(x)       while (1){ if (x == 0); };

void blpf2_init(blpf2_t *hblpf2, float wc, float dt);
float blpf2_apply(blpf2_t *hblpf2, float xn);


#endif /* __BLPF2_H */

/******************* (H) COPYRIGHT 2024 FUYEBING*****END OF FILE************/